<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/jsp/jstl.jsp" %>
<%@ taglib prefix="shiro" uri="http://www.springside.org.cn/tags/shiro" %>
<aside>
    <div id="sidebar"  class="nav-collapse ">
        <!-- sidebar menu start-->
        <ul class="sidebar-menu" id="nav-accordion">
			 <!-- 用户信息 -->        
        	  <p class="centered">
        	  	<a href="profile.html"><img src="assets/img/ui-sam.jpg" class="img-circle" width="60"></a>
        	  </p>
        	  <h5 class="centered">
        	  	<shiro:principal property="username"></shiro:principal>
        	  </h5>
        	    <c:if test="${menus!=null }">
	        		<!-- 菜单栏  读取 subject中的权限-->
		        	<c:forEach var="menu" items="${menus}">
		        		<li class="sub-menu">
			                <a href="javascript:;" >
			                    <i class="fa fa-desktop"></i>
			                    <span>系统设置</span>
			                </a>
			                <ul class="sub">
			                	<c:forEach var="chilMenu" items="${menu.childrenPermission}">
			                		<li><a href="${ctx}${chilMenu.permissionUrl}" target="mainframe">${chilMenu.permissionName}</a></li>
			                	</c:forEach>
			                    <li><a href="${ctx}/table/toTable.do"  target="mainframe">bootstrapTable</a></li>
			                </ul>
			            </li>
		        	</c:forEach>
		        </c:if>
        	
           <!--  <li class="sub-menu">
                <a class="active">
                    <i class="fa fa-dashboard"></i>
                    <span>系统设置</span>
                </a>
            </li> -->
            <%-- <li class="sub-menu">
                <a href="javascript:;" >
                    <i class="fa fa-desktop"></i>
                    <span>系统设置</span>
                </a>
                <ul class="sub">
                    <li><a href="${ctx}/user/userPage.do" target="mainframe">用户管理</a></li>
                    <li><a href="${ctx}/permission/permissionPage.do" target="mainframe">权限管理</a></li>
                    <li><a href="${ctx}/role/rolelist.do"  target="mainframe">角色管理</a></li>
                    <li><a href="${ctx}/table/toTable.do"  target="mainframe">bootstrapTable</a></li>
                </ul>
            </li>

        	<li class="sub-menu">
                <a href="javascript:;" >
                    <i class="fa fa-cogs"></i>
                    <span>Components</span>
                </a>
                <ul class="sub">
                    <li><a  href="calendar.html">Calendar</a></li>
                    <li><a  href="gallery.html">Gallery</a></li>
                    <li><a  href="todo_list.html">Todo List</a></li>
                </ul>
            </li>
            <li class="sub-menu">
                <a href="javascript:;" >
                    <i class="fa fa-book"></i>
                    <span>Extra Pages</span>
                </a>
                <ul class="sub">
                    <li><a  href="blank.html">Blank Page</a></li>
                    <li><a  href="login.html">Login</a></li>
                    <li><a  href="lock_screen.html">Lock Screen</a></li>
                </ul>
            </li>
            <li class="sub-menu">
                <a href="javascript:;" >
                    <i class="fa fa-tasks"></i>
                    <span>Forms</span>
                </a>
                <ul class="sub">
                    <li><a  href="form_component.html">Form Components</a></li>
                </ul>
            </li>
            <li class="sub-menu">
                <a href="javascript:;" >
                    <i class="fa fa-th"></i>
                    <span>Data Tables</span>
                </a>
                <ul class="sub">
                    <li><a  href="basic_table.html">Basic Table</a></li>
                    <li><a  href="responsive_table.html">Responsive Table</a></li>
                </ul>
            </li>
            <li class="sub-menu">
                <a href="javascript:;" >
                    <i class=" fa fa-bar-chart-o"></i>
                    <span>Charts</span>
                </a>
                <ul class="sub">
                    <li><a  href="morris.html">Morris</a></li>
                    <li><a  href="chartjs.html">Chartjs</a></li>
                </ul>
            </li>  --%>

        </ul>
        <!-- sidebar menu end-->
    </div>
</aside>